Enterprise Objects Framework Release 1.1 Copyright ã1995 by NeXT Computer, Inc.  All Rights Reserved.

NXFormatterValidation
(informal protocol)

Category Of:	Object

Declared In:	eointerface/NXEditableFormatter.h

Category Description

The NXFormatterValidation category declares methods for a delegate of an editable NXFormatter to monitor the changes it makes to values. The formatter only sends a validation message if the delegate responds to it.

A formatter specifies the field being edited in one of two manners: by row and column identifier, or by position in the static axis of the table view. Your delegate must implement the appropriate methods for both mannersÐlisted in the ªMethod Typesº sectionÐin order to be notified under all possible circumstances. (The field specification is determined when the formatter is sent an editFieldAt::inside:inView:withAttributes::usePositions:: message; see the description for this method in the NXEditableFormatter class specification for more information.)

Method Types

Notifications by identifier	- formatterWillChangeValueFor::sender:
- formatterWillChangeValueFor::to:sender:
- formatterDidChangeValueFor::to:sender:

Notification by position	- formatterWillChangeValueFor:at:sender:
- formatterWillChangeValueFor:at:to:sender:
- formatterDidChangeValueFor:at:to:sender:

Instance Methods

formatterDidChangeValueFor::to:sender:

- formatterDidChangeValueFor:rowIdentifier
:columnIdentifier
to:aValue
sender:sender

Informs the receiver that sender, an editable NXFormatter, has changed the value identified by rowIdentifier and columnIdentifier to aValue (an NXTableValue object). Returns self.

This method is only invoked when the field to be edited was specified by identifier only (that is, when both axes of the NXTableView are static). A delegate that implements this method should also implement formatterDidChangeValueFor:at:to:sender: to be notified when a field is specified by position.

formatterDidChangeValueFor:at:to:sender:

- formatterDidChangeValueFor:identifier
at:(unsigned int)position
to:aValue
sender:sender

Informs the receiver that sender, an editable NXFormatter, has changed the value at position in the static axis identified by identifier to aValue (an NXTableValue object). Returns self.

This method is only invoked when the field to be edited was specified by position. A delegate that implements this method should also implement formatterDidChangeValueFor::to:sender: to be notified when a field is specified by identifier.

formatterWillChangeValueFor::sender:

- (BOOL)formatterWillChangeValueFor:rowIdentifier
:columnIdentifier
sender:sender

Informs the receiver that sender, an editable NXFormatter, is about to edit the value at rowIdentifier and columnIdentifier (an NXTableValue object). If the delegate returns YES the formatter goes on to edit the value; if the delegate returns NO the formatter disallows editing.

This method is only invoked when the field to be edited was specified by identifier only. A delegate that implements this method should also implement formatterWillChangeValueFor:at:sender: to be notified when a field is specified by position.

formatterWillChangeValueFor:at:sender:

- (BOOL)formatterWillChangeValueFor:identifier
at:(unsigned int)position
sender:sender

Informs the receiver that sender, an editable NXFormatter, is about to edit the value at position in the static axis identified by identifier (an NXTableValue object). If the delegate returns YES the formatter goes on to edit the value; if the delegate returns NO the formatter disallows editing.

This method is only invoked when the field to be edited was specified by position. A delegate that implements this method should also implement formatterWillChangeValueFor::sender: to be notified when a field is specified by identifier.

formatterWillChangeValueFor:at:to:sender:

- (BOOL)formatterWillChangeValueFor:identifier
at:(unsigned int)position
to:aValue
sender:sender

Informs the receiver that sender, an editable NXFormatter, is about to change the value at position in the static axis identified by identifier to aValue (an NXTableValue object). If the delegate returns YES the change is made and the formatter ends editing; if the delegate returns NO the formatter doesn't end editing, requiring the user to enter a legal value.

This method is only invoked when the field to be edited was specified by position. A delegate that implements this method should also implement formatterWillChangeValueFor::to:sender: to be notified when a field is specified by identifier.

formatterWillChangeValueFor::to:sender:

- (BOOL)formatterWillChangeValueFor:rowIdentifier
:columnIdentifier
to:aValue
sender:sender

Informs the receiver that sender, an editable NXFormatter, is about to change the value identified by rowIdentifier and columnIdentifier to aValue (an NXTableValue object). If the delegate returns YES the change is made and the formatter ends editing; if the delegate returns NO the formatter doesn't end editing, requiring the user to enter a legal value.

This method is only invoked when the field to be edited was specified by identifier only. A delegate that implements this method should also implement formatterWillChangeValueFor:at:to:sender: to be notified when a field is specified by position.